<html lang="en">
<head>
    {% load static %}
    <meta charset="utf-8">
    <title>注册</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="{% static '/css/layui.css' %}" media="all">
</head>
<body>
<form action="" method="post">
    <h1>注册</h1>
    {% csrf_token %}
    <a href="{% url 'TestPlatform_User:Login'%}">返回到登录界面！</a>
    <p>
        <label for="id_username">用户名:</label>
        <input type="text" name="username" maxlength="150" autofocus required id="id_username">
    </p>
        {% if register_form.errors.username%}<p>用户名格式不正确！</p>
        {% endif %}
    <!--{{ register_form.errors.username }}-->
    <p>
        <label for="id_password1">密码:</label>
        <input type="password" name="password1" required id="id_password1">
        {{ register_form.errors.password1 }}
    </p>
    <!--{{ register_form.errors.password1 }}-->
    <p>
        <label for="id_password2">密码确认:</label>
        <input type="password" name="password2" required id="id_password2">
        <!--<span class="helptext">为了校验，请输入与上面相同的密码。</span>-->
        {{ register_form.errors.password2 }}
    </p>
    <!--{{ register_form.errors.password2 }}-->
    <button type="submit">注册</button>
    <!--Django自带功能表单-->

</form>

</body>
</html>